export const acData = [
    {
        id: '1999',
        name: 'SLR01-WiFi-08b',
        status: 'Up',
        configuration: 'Mismatched',
        firmware: '6.5.4.2_61807',
        upstream_device: '',
        upstream_port: '',
        role: 'Master',
        standby_master: 'SLR01-WiFi-08a',
        master_IP: '10.5.62.31',
        type: 'Aruba 7220',
        last_contacted: '3/13/2018 8:55 PM PDT',
        uptime: '153 days 0 hrs 3 mins',
        Lan_MAC: '00:1A:1E:02:F5:70',
        serial: 'CW0002290',
        Location: '',
        IP: '10.5.62.33',
        APs: 41,
        clients: 81,
        usage: '193.39 Kbps',
        VPN_sessions: 0,
        VPN_usage: '',
        notes: ''
    }
];

export const acData2 = [
    {
        id: '1998',
        name: 'SLR01-WiFi-08b',
        status: 'Down',
        configuration: 'Mismatched',
        firmware: '6.5.4.2_61807',
        upstream_device: '',
        upstream_port: '',
        role: 'Master',
        standby_master: 'SLR01-WiFi-08a',
        master_IP: '10.5.62.31',
        type: 'Aruba 7220',
        last_contacted: '3/13/2018 8:55 PM PDT',
        uptime: '153 days 0 hrs 3 mins',
        Lan_MAC: '00:1A:1E:02:F5:70',
        serial: 'CW0002290',
        Location: '',
        IP: '10.5.62.33',
        APs: 41,
        clients: 81,
        usage: '193.39 Kbps',
        VPN_sessions: 0,
        VPN_usage: '',
        notes: ''
    }
];

export const acColumns = [
    {
        'title': '名称',
        'key': 'name',
        'fixed': 'left',
        width: 140,
        render: (h, params) => {
            return h('a', {
                domProps: {
                    href: `#/AC-detail/${params.row.id}`
                }
            }, params.row.name);
        }
    },
    {
        'title': '状态',
        'key': 'show',
        'width': 120,
        filters: [
            {
                label: 'Up',
                value: 'Up'
            },
            {
                label: 'Down',
                value: 'Down'
            }
        ],
        filterMultiple: false,
        filterMethod(value, row) {
            return row.status === value

        },
        render: (h, params) => {
            return h('Tag', {
                props:
                    { color: params.row.status === 'Up' ? 'green' : 'red' }
            }, params.row.status);
        }
    },
    {
        'title': '控制器角色',
        'key': 'role'
    },
    {
        'title': 'AP数',
        'key': 'APs',
        'sortable': true
    },
    {
        'title': '终端数',
        'key': 'clients',
        'sortable': true
    },
    {
        'title': 'IP',
        'key': 'IP'
    },
    {
        'title': '型号',
        'key': 'type'
    },
    {
        'title': '运行时间',
        'key': 'uptime',
        'sortable': true
    }
];
